public class Truck extends Car{
    static{
        System.out.println("读入货车系统……");
    }
    {
        System.out.println("货车启动……");
    }
    private double height;
    private double storage;
    public Truck(int turnrate, double radius, double usetime, int passanger, double height, double storsge) {
        super.Car(turnrate, radius, usetime, passanger);
        this.height =height;
        this.storage =storsge;
    }


    //setter & getter
    public void setHeight(double inputh) {
        height = inputh;
    }
    public double getHeight() {
        return height;
    }
    public void setStorage(double inputs) {
        storage = inputs;
    }
    public double getStorage() {
        return storage;
    }
    
    //大货车功能描述
    public void getFuntion() {
        System.out.println("[功能] 大货车主要运用于工程运输领域，用来装载大型货物");
    }

    //大货车性能描述
    public void getValue() {
        System.out.println();
        super.getValue();
        System.out.println("[高度] " + this.getHeight() +"米");
        System.out.println("[荷载量] " +this.getStorage()+"吨");
    }
    
    //安全提示
    public void warnSafe() {
        if(this.getStorage() < 500){
            System.out.println("安全同行，祝您愉快");
        }
        else{
            System.out.println("您以超过限载量500吨，请停车");
        }
        
    }
}